﻿@{
    ViewBag.Title = "添加楼栋";
    Layout = "~/Areas/WorkSpace/Views/Shared/_CollegeAdminTemplete.cshtml";
}
@section head{
    <style type="text/css">
        .nav .active
        {
            /*background: url(<?php echo $this->img('manage_r2_c13.jpg');?>) no-repeat;*/
            background-color: #F5F5F5;
        }
        .nav .other
        {
            /* background: url(<?php echo $this->img('manage_r2_c14.jpg');?>) no-repeat;*/
            background-color: #E9E9E9;
        }
        h2.nav
        {
            border-bottom: 1px solid #B4C9C6;
            font-size: 13px;
            height: 25px;
            line-height: 25px;
            margin-top: 0px;
            margin-bottom: 0px;
        }
        h2.nav a
        {
            color: #999999;
            display: block;
            float: left;
            height: 24px;
            width: 113px;
            text-align: center;
            margin-right: 1px;
            margin-left: 1px;
            cursor: pointer;
        }
    </style>
}
<div id="content-header">
    <h1>
        添加楼栋</h1>
</div>
<div id="breadcrumb">
    <a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>首页</a>
    <a href="#" class="tip-bottom">楼栋管理</a> <a href="/workspace/CollegeAdmin/DormitoryInfoList"
        class="current">楼栋信息</a> <a href="#" class="current">添加/编辑</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-align-justify"></i></span>
                    <h5>
                        添加楼栋</h5>
                </div>
                <div class="widget-content nopadding">
                    <form id="dormitoryForm" action="/workspace/CollegeAdmin/NewDormitory" method="post" class="form-horizontal">
                   
                    <div class="control-group">
                        <label class="control-label">
                            楼栋名称</label>
                        <div class="controls">
                            <input type="text" placeholder="输入楼栋名称" name="name" style="width: 200px" class="span12 {required:true,remote:{url:'/workspace/collegeadmin/IsExits'},messages:{remote:'楼栋已存在'}}" />
                        <span style="color:Red;font-size:20px">&nbsp;&nbsp;*</span>
                        </div>
                    </div>
                     
                        @{
                            if (ViewBag.Error != null)
                            {
                                if (ViewBag.Error=="")
                                { 
                            <div  class="alert alert-success"><strong style="width:50%; margin:0px auto">操作成功！</strong></div>
                                }
                                else
                                {
                            <div  class="alert alert-error"><strong  style="width:50%; margin:0px auto">@ViewBag.Error</strong></div>
                                }
                            }
                        }
                    
                    <div class="form-actions">
                        <button type="submit" class="btn btn-primary">
                            保存</button>
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#likDormitory').addClass('open');
            $('#likDormitory').addClass('active');
            $('#dormitoryForm').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
    </script>
}
